/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package is.bean.stateless.xdumper;

import is.xdumper.type.Dump;
import is.xdumper.type.ValidatorResultContainer;
import is.xdumper.type.Entity;
import is.bean.entity.NamedEntityRemoteAccess;
import java.io.File;
import java.rmi.RemoteException;
import java.util.Collection;
import javax.ejb.EJBObject;
import org.xml.sax.SAXException;

/**
 *
 * @author aspr0
 */
public interface XdumperBeanRemote extends EJBObject
{
    @Deprecated
    Collection<NamedEntityRemoteAccess> listItemsExport(Entity entity) throws RemoteException;

    /**
     * @param index Dump holder with only ids of items specified to dump
     * @param xml XML file handler
     * @throws RemoteException
     */
    void doExport(Dump index, File xml) throws RemoteException;

    /**
     * Queries entity beans for listing of specified entity table
     *
     * @param entity
     * @return
     * @throws RemoteException
     */
    /* passing stream to bean caused serialization error, changed to string */
    ValidatorResultContainer validateImport(String dumpXml) throws RemoteException, SAXException;

    void doImport(Dump dump) throws RemoteException;
}
